print("Doge语 V1.5翻译器")
print("正初始化...",end="")
from dogelanguagecore import *
print("OK")
while 1:
    choose=True
    while choose:
        mode=input("请输入模式(1:翻译为doge语 2:doge翻译回原文 3:退出):")
        if mode == "1" or mode == "2" or mode=="3":
            choose=False
        else:
            print("无效的选项，请重新输入...")
    if mode == "1":
        string=input("请输入字符串(仅英文大小写，数字，英文标点，英文符号受支持,否则出错):")
        out=string2hex(string)
        print("字符串Hex:",out)
        out=hex2doge(out)
        pyperclip.copy(out)
        print("结果(已复制):",out)
    elif mode == "2":
        string=input("请输入Doge语:")
        out=doge2hex(string)
        print("结果:",out)
    else:
        exit()